home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
utility
/
ffg155.zip
/
DEMO_BAT.ZIP
/
DIREXIST.BAT
< prev
next >
Wrap
DOS Batch File
|
1993-10-31
|
861b
|
29 lines
@echo off
::
:: This batch file uses FFG to for existence of a specified directory. If it
:: exists a message saying so is displayed. Similarly, a message
:: states that the directory does not exist if it is not found. It will
:: find hidden directories too.
::
::
:: Notes on FFG parameters:
:: 1. /q suppresses normal FFG output
:: 2. /r prevents searching beyond the specified directory
:: 3. /1 stops after first find to avoid unnecessary searching
::
:: %1 holds the directory to find, which must have a terminating backslash
::
if %1.==. goto USAGE
ffg /q /r /1 %1
if errorlevel 1 if not errorlevel 2 goto FOUND
echo Directory "%1" doesn't exist.
goto END
:FOUND
echo Directory "%1" exists.
goto END
:USAGE
echo USAGE: %0 FullDirSpec\
echo.
echo Note: You must use a trailing backslash '\'
:END